/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package an_sim;

import java.awt.BorderLayout;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.JTable;

/**
 *
 * @author Karcsi
 */
public class windowView {
    treeView tree;
    JTable table;

    public windowView(treeView tree, tableView tables) {
        this.tree = tree;
        table = new JTable(tables.content, tables.titles);
         JFrame frame = new JFrame();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        JTabbedPane tabbedPane = new JTabbedPane();


JComponent panel1 = tree.buildTree();
tabbedPane.addTab("TreeView", panel1);

JComponent panel2 = table;
tabbedPane.addTab("TableView", panel2);


        JScrollPane scrollPane = new JScrollPane(tabbedPane);
        frame.add(scrollPane, BorderLayout.CENTER);
        frame.setSize(800, 600);
        frame.setVisible(true);
    }

}
